package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;import com.lanchetech.bean.vo.BargainSpuItemVO;import com.lanchetech.entity.BargainSpu;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface BargainSpuMapper {
    int deleteByPrimaryKey(Long id);

    int insert(BargainSpu record);

    int insertSelective(BargainSpu record);

    BargainSpu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BargainSpu record);

    int updateByPrimaryKey(BargainSpu record);

    int updateBatch(List<BargainSpu> list);

    int updateBatchSelective(List<BargainSpu> list);

    int batchInsert(@Param("list") List<BargainSpu> list);

    List<BargainSpu> findAllByActivityId(@Param("activityId") Long activityId);

    int deleteByActivityIdAndSpuIds(@Param("activityId") Long activityId, @Param("spuIds") long[] spuIds);

    List<BargainSpuItemVO> findAllPageForUser(PageReq req);

    BargainSpu findOneByActivityIdAndSpuId(@Param("activityId") Long activityId, @Param("spuId") Long spuId);

    BargainSpu findOneByActivityId(@Param("activityId") Long activityId);

    List<BargainSpu> findAllByActivityIds(@Param("activityIds") List<Long> activityIds);

    int updateDeletedAndStatusByActivityId(@Param("updatedDeleted")Byte updatedDeleted,@Param("updatedStatus")Byte updatedStatus,@Param("activityId")Long activityId);

    int updateStatusByActivityIds(@Param("updatedStatus")Byte updatedStatus,@Param("activityIds") List<Long> activityIds);


}